<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <button id="btn1">btn1</button>
        <button id="btn2">btn2</button>
        <button id="btn3" onclick="btn3fun()">btn3</button>
    </div>
    <script>
        // 还记得js中原生的三种绑定事件的方式吗? 下面带你复习一下, 看看就都想起来了
        const btn1 = document.getElementById('btn1')
        const btn2  = document.getElementById('btn2')
        const btn3 = document.getElementById('btn3')

        btn1.addEventListener('click',()=>{
            console.log('I am btn1')
        })

        btn2.onclick = ()=>{
            console.log('i am btn2')
        }

        function btn3fun(){
            console.log('i am btn3')
        }
    </script>
</body>
</html>